* xterm.c (XTread_socket): Turn off ControlMask for XLookupString.
authorJim Blandy <jimb@redhat.com>
Tue, 18 May 1993 22:24:14 +0000 (22:24 +0000)
committerJim Blandy <jimb@redhat.com>
Tue, 18 May 1993 22:24:14 +0000 (22:24 +0000)
* keyboard.c (make_lispy_event): Controlify here.

src/keyboard.c

index bd418433489eea0c3f7151ce4654437a50a222f1..b6313ab7b12b03e23150ff24277be62602dbe1b6 100644 (file)
@@ -2090,11 +2090,16 @@ make_lispy_event (event)
     case ascii_keystroke:
       {
        int c = XFASTINT (event->code);
-       /* Include the bits for control and shift
-          only if the basic ASCII code can't indicate them.  */
-       if ((event->modifiers & ctrl_modifier)
-           && c >= 040)
-         c |= ctrl_modifier;
+       /* Turn ASCII characters into control characters
+          when proper.  */
+       if (event->modifiers & ctrl_modifier)
+         {
+           if (c >= 0100 && c < 0140)
+             c &= ~040;
+           /* Include the bits for control and shift
+              only if the basic ASCII code can't indicate them.  */
+           c |= ctrl_modifier;
+         }
        /* Set the shift modifier for a control char
           made from a shifted letter.  But only for letters!  */
        if (XFASTINT (event->code) >= 'A' - 0100